package com.xiaoxi.factroymethodmode;

import com.xiaoxi.factroymethodmode.factory.Factory;
import com.xiaoxi.factroymethodmode.factory.IDCardFactory;
import com.xiaoxi.factroymethodmode.product.Product;

/**
 * @ClassName Main
 * @Description
 * @Author xiaoxi
 * @Date 2023/3/9 22:36
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {

        Factory factory = new IDCardFactory();
        Product product1 = factory.create("小明");
        Product product2 = factory.create("小红");
        Product product3 = factory.create("小帅");

        product1.use();
        product2.use();
        product3.use();

        System.out.println(factory.getFactory());
    }
}
